Skip to content

Conversation

@ganesh-k13
Copy link
Contributor

Changes

  • Added a -j auto for spin build

Testing

(np-test) ➜  numpy git:(main) spin build -j auto
Building with 12 parallel jobs
$ /<>/os/np-test/bin/python3 vendored-meson/meson/meson.py compile -j 12 -C build
INFO: autodetecting backend as ninja
...

We can speed up CI jobs for all NumPy workflows post this using -j auto

@stefanv
Copy link
Member

stefanv commented Feb 11, 2026

I think Meson has this built-in, if you set -j 0? But, it also seems to be on by default (I just checked, and NumPy compilation uses all cores).

@ganesh-k13
Copy link
Contributor Author

Oh, my laptop was always using a single core, not sure why. Maybe an issue from my end, let me take a look.

@rgommers
Copy link
Contributor

This shouldn't be needed indeed. By default, ninja will use 2*n_cpu + 2 build processes (e.g., if your machine has 12 physical cores, it'll use max 26 processes). It isn't even possible to change that with an environment variable, only by explicitly passing -j1. So please look at how ninja gets invoked on your machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants